          {%- comment %}
            Here's the complete hierarchy of software.json:

              The "top" level is the object type (eg, hardware, software, documentation)
              The second level is a "machine" aka platform key (eg, osi, pcx86, etc.)
              The third level is a set of category keys (eg, app, driver, lang, sys, etc.)
              The fourth level is a set of subcategory keys (eg, apl, basic, c, pascal, etc.)
              The fifth level is a set of vendor keys (eg, borland, dresearch, ibm, microsoft, etc.)
              The sixth level is a set of product keys (eg, quickbasic, visualbasic, etc.)
              The seventh level is a set of versions (eg, 1.00, 2.00, etc.) inside a @versions object
              The eighth level is a list of media items inside a @media array

            However, entries in software.json are allowed to "short-circuit" this hierarchy to some extent;
            ie, you can "jump" from platform, category, or subcategory directly to products by placing
            a "@products" key inside any of those three levels.  The "osi" section is one example: there
            is a limited amount of software for that platform, so there's no need to force users to drill
            down as much; the subcategories of BASIC programs are more like vendors, each subcategory has a
            list of products, and each product is a single media item (assumed whenever @versions is omitted).

            Other special keys include:

              @title: this should generally appear at every level, because the keys only describe
              the hierarchy of the objects, not their names; one exception are version entries, where
              the version key *is* the version number, and if a no @title is present for a version,
              a default title (product @title plus version key) will be used instead.

              @hardware: an optional entry inside a version to define a default hardware configuration;
              if that entry contains a 'url' property, we will use it to generate a link (hardware_url) for
              running the software.

              @autoMount: an optional entry inside a version to define a "custom" autoMount URL parameter,
              instead of the one automatically generated from the list of @media items; eg:

                "@autoMount": {
                  "A": {"@diskette": "IBM-PCDOS-200-DISK1.json"},
                  "B": {"@diskette": "IBM-PCDOS-200-DISK2.json"}
                }

              @bootable: if there is no "custom" autoMount setting, then one will be automatically generated
              from the @media items, and @bootable determines whether or not the first item will be loaded into
              the boot drive (assumed to be "A").

          {%- endcomment %}
          <ul class="pcjs-explorer-top">
            <li id="pcjs-software" class="pcjs-explorer-fixed">Software
              <ul>
              {%- for family in site.data.software -%}
                {%- if site.developer %}
                <!-- family: {{ family[0] }} -->
                {%- endif -%}
                {%- if family[1]['@instances'] %}
                <li class="pcjs-explorer-family pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ family[1]['@title'] | default: family[0] }}
                  <ul>
                  {%- assign machines = family[1]['@instances'] -%}
                  {%- if machines[0]['@title'] -%}
                    {%- for instance in machines %}
                    <li id="{{ instance['@permalink'] | slugify }}" class="pcjs-explorer-version pcjs-explorer-item">
                      <a href="{{ instance['@permalink'] }}">{{ instance['@title'] }}</a>
                    </li>
                    {%- endfor %}
                  </ul>
                </li>
                    {%- continue -%}
                  {%- endif -%}
                {%- else -%}
                  {%- assign machines = family[1] -%}
                {%- endif -%}
                {%- for machine in machines -%}
                  {%- if site.developer %}
                    <!-- machine: {{ machine[0] }} -->
                    <!-- machine_data: {{ machine[1] }} -->
                  {%- endif -%}
                  {%- capture machine_type -%}{%- if machine[0] != "" -%}{{ machine[0] }}{%- else -%}{{ family[0] }}{%- endif -%}{%- endcapture -%}
                  {%- capture software_type -%}{{ machine[1]['@type'] }}{%- endcapture -%}
                  {%- capture software_path1 -%}{{ machine[1]['@path'] }}{%- endcapture -%}
                  {%- capture machine_url -%}/machines{{ software_path1 }}/{%- endcapture -%}
                  {%- assign diskette_drives = machine[1]['@diskette_drives'] -%}
                  {%- assign machine_group = site.data.machines[machine_type].folder | split: '/' -%}
                  {%- unless machine_group[1] %}
                    {%- assign categories = site.data[machine_type][software_type] | sort -%}
                  {%- else %}
                    {%- assign machine_group = machine_group[0] -%}
                    {%- assign categories = site.data[machine_group][machine_type][software_type] | sort -%}
                  {%- endunless %}
                    <li id="software-{{ machine_type }}" class="pcjs-explorer-platform pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ machine[1]['@title'] | default: machine_type }}
                      <ul>
                    {%- for category in categories -%}
                      {%- if site.developer %}
                        <!-- category: {{ category[0] }} -->
                      {%- endif -%}
                      {%- if category[0] contains '@' -%}{%- continue -%}{%- endif -%}
                      {%- if category[1]['@hidden'] -%}{%- continue -%}{%- endif -%}
                      {%- assign subcategories = category[1] -%}
                      {%- capture software_path2 -%}/{{ category[0] }}{%- endcapture %}
                        <li id="software-{{ machine_type }}-{{ category[0] }}" class="pcjs-explorer-category pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ category[1]['@title'] | default: category[0] }}
                          <ul>
                      {%- if subcategories['@server'] %}
                        {%- assign server_default = subcategories['@server'] %}
                      {%- else %}
                        {%- assign server_default = "" %}
                      {%- endif %}
                      {%- if site.developer %}
                          <!-- server_default: {{ server_default }} -->
                      {%- endif -%}
                      {%- for subcategory in subcategories -%}
                        {%- if site.developer %}
                            <!-- subcategory: {{ subcategory[0] }} -->
                        {%- endif -%}
                        {%- if subcategory[1]['@hidden'] -%}{%- continue -%}{%- endif -%}
                        {%- if subcategory[0] == '@products' or subcategory[0] == '@versions' -%}
                          {%- assign vendors = subcategories %}
                          {%- capture software_path3 -%}{%- endcapture -%}
                        {%- elsif subcategory[0] contains '@' -%}
                          {%- continue -%}
                        {%- else -%}
                          {%- assign vendors = subcategory[1] -%}
                          {%- capture software_path3 -%}/{{ subcategory[0] }}{%- endcapture %}
                            <li class="pcjs-explorer-subcategory pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ subcategory[1]['@title'] | default: subcategory[0] }}
                              <ul>
                        {%- endif -%}

                        {%- for vendor in vendors -%}
                          {%- if site.developer %}
                                <!-- vendor: {{ vendor[0] }} -->
                          {%- endif -%}
                          {%- if vendor[1]['@hidden'] -%}{%- continue -%}{%- endif -%}
                          {%- if vendor[0] == '@products' or vendor[0] == '@versions' -%}
                            {%- assign products = vendors -%}
                            {%- capture software_path4 %}{% endcapture -%}
                          {%- elsif vendor[0] contains '@' -%}
                            {%- continue -%}
                          {%- elsif vendor[1]['@products'] -%}
                            {%- assign products = vendor[1]['@products'] %}
                            {%- capture software_path4 -%}{%- endcapture -%}
                          {% else -%}
                              {%- assign products = vendor[1] -%}
                              {%- capture software_path4 -%}/{{ vendor[0] }}{%- endcapture %}
                                <li class="pcjs-explorer-vendor pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ vendor[1]['@title'] | default: vendor [0] }}
                                  <ul>
                          {%- endif -%}

                          {%- for product in products -%}
                            {%- if site.developer %}
                                    <!-- product: {{ product[0] }} -->
                            {%- endif -%}
                            {%- if product[1]['@hidden'] -%}{%- continue -%}{%- endif -%}
                            {%- if product[0] == '@products' or product[0] == '@versions' -%}
                              {%- assign versions = product[1] -%}
                              {%- capture software_path5 %}{% endcapture -%}
                            {%- elsif product[0] contains '@' -%}
                              {%- continue -%}
                            {%- else -%}
                              {%- assign versions = product[1]['@versions'] %}
                              {%- capture software_path5 %}/{{ product[0] }}{% endcapture %}
                                    <li class="pcjs-explorer-product pcjs-explorer-closed" onclick="pcjsExplorerClick(this, event)">{{ product[1]['@title'] | default: product[0] }}
                                      <ul>
                            {%- endif -%}

                            {%- for version in versions -%}
                              {%- if site.developer %}
                                        <!-- version: {{ version[0] }} -->
                              {%- endif -%}
                              {%- assign release = version[1] -%}
                              {%- if release['@hidden'] -%}{%- continue -%}{%- endif -%}
                              {%- if release['@title'] -%}
                                {%- capture software_desc -%}{%- if release['@desc'] %} title="{{ release['@desc'] }}"{%- endif -%}{%- endcapture -%}
                                {%- capture software_title %}{{ release['@title'] }}{% endcapture -%}
                              {%- else -%}
                                {%- capture software_desc -%}{%- if product[1]['@desc'] %} title="{{ product[1]['@desc'] }}"{%- endif -%}{%- endcapture -%}
                                {%- capture software_title %}{{ product[1]['@title'] }}{% if version[0] != "" %} {{ version[0] }}{% endif %}{% endcapture -%}
                              {%- endif -%}
                              {%- capture hardware_url -%}{{ release['@hardware']['url'] }}{%- endcapture -%}
                              {%- capture alternate_url -%}{{ release['@permalink'] }}{%- endcapture -%}
                              {%- if server_default == "" %}
                                {%- if category[0] != "game" -%}{%- assign server_default = "/diskettes" -%}{%- else -%}{%- assign server_default = "/gamedisks" -%}{%- endif -%}
                              {%- endif %}
                              {%- if site.developer %}
                                        <!-- server_default: {{ server_default }} -->
                              {%- endif -%}
                              {%- capture diskette_server -%}{{ release['@server'] | default: server_default }}{%- endcapture -%}
                              {%- capture harddisk_server -%}{{ release['@server'] | default: "/harddisks" }}{%- endcapture -%}
                              {%- capture software_url -%}{{ software_path1 }}{{ software_path2 }}{{ software_path3 }}{{ software_path4 }}{{ software_path5 }}{%- if version[0] != "" and alternate_url == "" -%}/{{ version[0] }}{%- endif -%}{%- endcapture -%}
                              {%- capture software_id -%}software-{{ software_url | remove_first: "/" | replace: "/", "-" }}{%- if alternate_url == "#" -%}-{{ version[0] }}{%- endif -%}{%- endcapture -%}
                              {%- assign software_parms = "" -%}
                              {%- if site.developer %}
                                        <!-- machine_url: {{ machine_url }} -->
                                        <!-- hardware_url: {{ hardware_url }} -->
                                        <!-- software_url: {{ software_url }} -->
                                        <!-- software_id: {{ software_id }} -->
                              {%- endif -%}
                              {%- assign autoMount = "" -%}{%- assign autoDrive = "" -%}{%- assign autoState = "" -%}
                              {%- capture autoType -%}{%- if release['@autoType'] -%}&autoType={{ release['@autoType'] | replace: "\","%5C" }}{%- endif -%}{%- endcapture -%}
                              {%- if hardware_url != "" -%}{%- comment -%} or page.permalink contains machine_url {%- endcomment -%}
                                {%- if release['@autoMount'] -%}
                                  {%- capture autoMount -%}{% assign disk_num = 0 %}{% for drive in release['@autoMount'] %}{% assign disk_num = disk_num | plus:1 %}{{ drive[0] }}:%7Bname:%22{% if drive[1]['@title'] %}{{ drive[1]['@title'] }}{% else %}{{ software_title }}{% if release['@title'] == nil and release['@media'].size > 1 %} (Disk {{ disk_num }}){% endif %}{% endif %}%22,path:%22{{ diskette_server }}{{ software_url }}/{{ drive[1]['@diskette'] }}%22%7D,{% endfor %}@{%- endcapture -%}
                                {%- elsif release['@media'][0]['@diskette'] -%}
                                  {%- if release['@bootable'] -%}{%- assign drive_num = 0 -%}{%- else -%}{%- assign drive_num = 1 -%}{%- endif -%}
                                  {%- capture autoMount -%}{% assign disk_num = 0 %}{% for disk in release['@media'] %}{{ diskette_drives[drive_num] }}{% assign disk_num = disk_num | plus:1 %}{% assign drive_num = drive_num | plus:1 %}:%7Bname:%22{% if disk['@title'] %}{{ disk['@title'] }}{% else %}{{ software_title }}{% if release['@title'] == nil and release['@media'].size > 1 %} (Disk {{ disk_num }}){% endif %}{% endif %}%22,path:%22{{ diskette_server }}{{ software_url }}/{{ disk['@diskette'] }}%22%7D,{% if drive_num >= diskette_drives.size %}{% break %}{% endif %}{% endfor %}@{%- endcapture -%}
                                  {%- if release['@state'] -%}{%- capture autoState -%}&state={{ diskette_server }}{{ software_url }}/{{ release['@state'] }}{%- endcapture -%}{%- endif -%}
                                {%- elsif release['@media'][0]['@harddisk'] -%}
                                  {%- capture autoDrive -%}{% for disk in release['@media'] %}%7Bname:%22{{ disk['@name'] }}%22,type:{{ disk['@type'] }},path:%22{{ harddisk_server }}{{ software_url }}/{{ disk['@harddisk'] }}.json%22%7D,{% endfor %}@{%- endcapture -%}
                                  {%- if release['@state'] -%}{%- capture autoState -%}&state={{ harddisk_server }}{{ software_url }}/{{ release['@state'] }}{%- endcapture -%}{%- endif -%}
                                {%- endif -%}
                                {%- if autoDrive != "" -%}{%- capture autoDrive -%}&drives=[{{ autoDrive | replace: ",@", "" | replace: " ","%20" }}]{%- endcapture -%}{%- endif -%}
                                {%- if autoMount != "" -%}{%- capture autoMount -%}&autoMount=%7B{{ autoMount | replace: ",@", "" | replace: " ","%20" }}%7D{%- endcapture -%}{%- endif -%}
                                {%- capture software_parms -%}{%- if hardware_url contains '?' -%}&{%- else -%}?{%- endif -%}software={{ software_url }}/{{ autoMount }}{{ autoDrive }}{{ autoState }}{{ autoType }}{%- endcapture -%}
                              {%- elsif alternate_url != "" -%}
                                {%- if alternate_url != "#" -%}
                                  {%- assign hardware_url = alternate_url -%}
                                {%- else -%}
                                  {%- capture hardware_url -%}/software{{ software_url }}/#{{ version[0] }}{%- endcapture -%}
                                {%- endif -%}
                              {%- elsif release['@inactive'] != true -%}
                                {%- capture software_parms -%}/software{{ software_url }}/{%- endcapture -%}
                                {%- if release['@tape'] -%}
                                  {%- capture software_parms -%}{{ software_parms }}?autoStart=true&autoMount=%7Bname:%22{{ software_title | replace: " ","%20" }}%22,path:%22/software{{ software_url }}/{{ release['@tape'] }}%22%7D{%- endcapture -%}
                                {%- endif -%}
                              {%- endif %}
                                        <li id="{{ software_id }}" class="pcjs-explorer-version pcjs-explorer-item"{{ software_desc }}>
                                          <a href="{{ hardware_url }}{{ software_parms }}">{{ software_title }}</a>
                                        </li>
                            {%- endfor -%}

                            {%- if software_path5 != "" %}
                                      </ul>
                                    </li>
                            {%- endif -%}
                          {%- endfor -%}
                          {%- if software_path4 != "" %}
                                  </ul>
                                </li>
                          {%- endif -%}
                        {%- endfor -%}
                        {%- if software_path3 != "" %}
                              </ul>
                            </li>
                        {%- endif -%}
                      {%- endfor -%}
                      {%- if software_path2 != "" %}
                          </ul>
                        </li>
                      {%- endif -%}
                    {%- endfor %}
                      </ul>
                    </li>
                  {%- endfor -%}
                {%- if family[1]['@instances'] %}
                  </ul>
                </li>
                {%- endif -%}
              {%- endfor %}
              </ul>
            </li>
          </ul>
